let storage = {
  KEY: {
    Authorization: "Authorization",
    UserInfo: "UserInfo",
    Checked: "Checked",
    CurrentPath: "CurrentPath",
  },
  localStorageGet(key) {
    if (localStorage.getItem(key)) return JSON.parse(localStorage.getItem(key));
    else return null;
  },
  localStorageSet(key, value) {
    localStorage.setItem(key, JSON.stringify(value));
  },
  localStorageRemove(key) {
    localStorage.removeItem(key);
  },
  sessionStorageGet(key) {
    if (sessionStorage.getItem(key))
      return JSON.parse(sessionStorage.getItem(key));
    else return null;
  },
  sessionStorageSet(key, value) {
    sessionStorage.setItem(key, JSON.stringify(value));
  },
  sessionStorageRemove(key) {
    sessionStorage.removeItem(key);
  },
};
export default storage;
